Untitled

A new article created using the Distill format.

Federico Córdoba https://blackfriedrich.github.io/spatialdataportal/blackfriedrich.html (OFUT-FAU-UNT)https://www.observatoriofau.com.ar/
2024-08-21
# Define el nombre del municipio con el que deseas exportar
municipio_name <- "Las Talitas"
#Cargamos la información

limite_municipal <- st_read("https://drive.google.com/uc?export=download&id=1chXHr_hJF5EPwAiUatT_rw78OaLE_MaX")
Reading layer `las_talitas_limite' from data source 
  `https://drive.google.com/uc?export=download&id=1chXHr_hJF5EPwAiUatT_rw78OaLE_MaX' 
  using driver `GeoJSON'
Simple feature collection with 1 feature and 7 fields
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: -65.21783 ymin: -26.79631 xmax: -65.1549 ymax: -26.73014
Geodetic CRS:  WGS 84
# bbox
buildings_bbox <- read_csv("https://drive.google.com/uc?export=download&id=1Asf9Dl73Ng8EK9BL8ezjYIaSlHwgCcLi")

vial_bbox <- st_read("https://drive.google.com/uc?export=download&id=1xGm6YfcZmVt_dYhtJw60lnfS-8vBlSVA")
Reading layer `las_talitas_vial_bbox' from data source 
  `https://drive.google.com/uc?export=download&id=1xGm6YfcZmVt_dYhtJw60lnfS-8vBlSVA' 
  using driver `GeoJSON'
Simple feature collection with 1181 features and 25 fields
Geometry type: LINESTRING
Dimension:     XY
Bounding box:  xmin: -65.23706 ymin: -26.82497 xmax: -65.14743 ymax: -26.67348
Geodetic CRS:  WGS 84
amenity_bbox <- st_read("https://drive.google.com/uc?export=download&id=1OjnnkcWYgCHO40hZcBrFrgwsKcGAOy2v")
Reading layer `las_talitas_amenity_bbox' from data source 
  `https://drive.google.com/uc?export=download&id=1OjnnkcWYgCHO40hZcBrFrgwsKcGAOy2v' 
  using driver `GeoJSON'
Simple feature collection with 107 features and 38 fields
Geometry type: POINT
Dimension:     XY
Bounding box:  xmin: -65.21775 ymin: -26.79674 xmax: -65.16897 ymax: -26.74711
Geodetic CRS:  WGS 84
#Sólo del municipio

buildings <- read_csv("https://drive.google.com/uc?export=download&id=19BIhBUXnRuDEGM_n98BGeHFmRolMg-ly")

vial <- st_read("https://drive.google.com/uc?export=download&id=1hj8vXxC_Gr-kK2AIVZVRprNXEqIanRz8")
Reading layer `las_talitas_vial_recc' from data source 
  `https://drive.google.com/uc?export=download&id=1hj8vXxC_Gr-kK2AIVZVRprNXEqIanRz8' 
  using driver `GeoJSON'
Simple feature collection with 804 features and 32 fields
Geometry type: MULTILINESTRING
Dimension:     XY
Bounding box:  xmin: -65.21783 ymin: -26.79549 xmax: -65.15576 ymax: -26.73014
Geodetic CRS:  WGS 84
amenity <- st_read("https://drive.google.com/uc?export=download&id=18cQwojuIMM0TIJGTUHBR5mfAxELaqRxI")
Reading layer `las_talitas_amenity_rec' from data source 
  `https://drive.google.com/uc?export=download&id=18cQwojuIMM0TIJGTUHBR5mfAxELaqRxI' 
  using driver `GeoJSON'
Simple feature collection with 61 features and 45 fields
Geometry type: MULTIPOINT
Dimension:     XY
Bounding box:  xmin: -65.21115 ymin: -26.79407 xmax: -65.17433 ymax: -26.75482
Geodetic CRS:  WGS 84
parcelas <- st_read("https://drive.google.com/uc?export=download&id=1fZikJD3rYCJo3dUuPnJEsp_K19mTzKlc")
Reading layer `las_talitas_parcelas' from data source 
  `https://drive.google.com/uc?export=download&id=1fZikJD3rYCJo3dUuPnJEsp_K19mTzKlc' 
  using driver `GeoJSON'
Simple feature collection with 15338 features and 14 fields
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: 3577821 ymin: 7036761 xmax: 3584071 ymax: 7043985
Projected CRS: POSGAR 2007 / Argentina 3
ggplot() +
  geom_sf(data = limite_municipal, fill = "lightblue", color = "darkblue") +
  geom_point(data = buildings_bbox, aes(x = longitude, y = latitude)) +
  
  coord_sf() +  # Asegurarse de que las coordenadas sean manejadas correctamente
  ggtitle("superficie edificada de la unidad municipio") +
  theme_minimal()

ggplot() +
  geom_sf(data = limite_municipal, fill = "grey", color = "black", linetype = "dashed") +
  geom_point(data = buildings_bbox, aes(x = longitude, y = latitude), color = "black", size = 0.2) +
  geom_sf(data = vial, color = "darkred", linetype = "solid") +
  geom_sf(data = amenity_bbox, color = "blue", size = 2, shape = 17) +
  coord_sf() +
  ggtitle("Análisis espacial de la unidad municipio") +
  labs(color = "Elementos") +
  scale_color_manual(values = c("gray" = "Edificios", "red" = "Puntos extra", "black" = "Líneas extra")) +
  theme_minimal()

str(buildings)
spc_tbl_ [43,567 × 12] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
 $ latitude      : num [1:43567] -26.8 -26.8 -26.8 -26.8 -26.8 ...
 $ longitude     : num [1:43567] -65.2 -65.2 -65.2 -65.2 -65.2 ...
 $ area_in_meters: num [1:43567] 214.8 55.4 160.6 64.4 148.6 ...
 $ confidence    : num [1:43567] 0.753 0.837 0.901 0.754 0.815 ...
 $ full_plus_code: chr [1:43567] "575P6R7F+RG5H" "575P6QJR+WPC5" "575P6RQ8+Q8VF" "575P6QPV+948M" ...
 $ osm_id        : num [1:43567] 3491670 3491670 3491670 3491670 3491670 ...
 $ name          : chr [1:43567] "Las Talitas" "Las Talitas" "Las Talitas" "Las Talitas" ...
 $ admin_level   : num [1:43567] 7 7 7 7 7 7 7 7 7 7 ...
 $ boundary      : chr [1:43567] "administrative" "administrative" "administrative" "administrative" ...
 $ type          : chr [1:43567] "boundary" "boundary" "boundary" "boundary" ...
 $ wikidata      : chr [1:43567] "Q2092486" "Q2092486" "Q2092486" "Q2092486" ...
 $ wikipedia     : chr [1:43567] "es:Las Talitas" "es:Las Talitas" "es:Las Talitas" "es:Las Talitas" ...
 - attr(*, "spec")=
  .. cols(
  ..   latitude = col_double(),
  ..   longitude = col_double(),
  ..   area_in_meters = col_double(),
  ..   confidence = col_double(),
  ..   full_plus_code = col_character(),
  ..   osm_id = col_double(),
  ..   name = col_character(),
  ..   admin_level = col_double(),
  ..   boundary = col_character(),
  ..   type = col_character(),
  ..   wikidata = col_character(),
  ..   wikipedia = col_character()
  .. )
 - attr(*, "problems")=<externalptr> 

link al mapa en A3

mapa movil

mapview(parcelas, label = parcelas$name, color = "red", col.regions = "red", alpha.regions = .05)

leaflet() %>% addTiles() %>%
addPolygons(data = limite_municipal, fillColor = “lightblue”, color = “darkblue”, weight = 2) %>% addCircles(data = buildings, radius = 5, color = “gray”, fillOpacity = 0.8) %>% addCircles(data = amenity, radius = 5, color = “red”, fillOpacity = 0.8) %>% addPolylines(data = vial, color = “black”, weight = 2)